#!/usr/bin/env bash
script_pwd=$(dirname "$0")

base_path=~/docker/ELK/elasticsearch1
rm -rf $base_path/config 
mkdir -p $base_path/logs
mkdir -p $base_path/data
mkdir -p $base_path/plugins
cp -r $script_pwd/config1 $base_path/config



base_path=~/docker/ELK/elasticsearch2
rm -rf $base_path/config 
mkdir -p $base_path/logs
mkdir -p $base_path/data
mkdir -p $base_path/plugins
cp -r $script_pwd/config2 $base_path/config



base_path=~/docker/ELK/elasticsearch3
rm -rf $base_path/config 
mkdir -p $base_path/logs
mkdir -p $base_path/data
mkdir -p $base_path/plugins
cp -r $script_pwd/config3 $base_path/config



# docker exec -it elk-elasticsearch /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic -i
# docker exec -it elk-elasticsearch /usr/share/elasticsearch/bin/elasticsearch-reset-password -u kibana_system -i
